package com.ftg.learn.chapter05;

import java.util.Arrays;

/**
 * 数组
 * @author kangjx
 * @date 2022/12/16
 */
public class Second {

    public static void main(String[] args) {
        double[] ds = {2,34,(int)4.5};
        char[] cs = new char[26];
        //cs.length ---> 长度
        // 通过循环为字符数组赋值
        for (int i = 0; i < cs.length; i++) {
            cs[i] = (char)(97 + i);
        }

        // 数据的遍历  把数组里面的每一个元素 打印出来
        for(int i =0;i < cs.length;i++){
            System.out.print(cs[i]+"\t");
        }

        double[] t = new double[]{1,2,34,5};
        System.out.println(t);
//        [D@74a14482
        double[] t1 = new double[]{1,2,34,5};
        double[] t2 = t;
//        [D@74a14482
        System.out.println(t2);
//        [D@1540e19d
        System.out.println(t1 == t);
        System.out.println(t2 == t);
//        getClass().getName() + "@" + Integer.toHexString(hashCode());
//        "aaa123" "aa2332"


//        findArrWithTarget(new int[]{1,23,4,5,6,7,8},8);
    }
    //给定一个数组 问这个里面有没有指定数
    public boolean findArrWithTarget(int[] arr,int target){

        return false;
    }

}
